package com.yidu.drug.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.yidu.drug.model.ManufacturePlanModel;

public interface ManufacturePlanModelMapper {
    int deleteByPrimaryKey(String mpId);

    int insert(ManufacturePlanModel record);

    int insertSelective(ManufacturePlanModel record);

    ManufacturePlanModel selectByPrimaryKey(String mpId);

    int updateByPrimaryKeySelective(ManufacturePlanModel record);

    int updateByPrimaryKey(ManufacturePlanModel record);
    
    /**
     * 查询所有(包括根据条件查询和分页)
     * @param record 制造对象
     * @return 返回一个集合
     */
    List<ManufacturePlanModel> findAll(ManufacturePlanModel record);
    
    /**
     * 查询总行数(包括根据条件查询)
     * @param record 制造对象
     * @return 返回一个总行数
     */
    long findRows(ManufacturePlanModel record);
    
    ManufacturePlanModel findByProIdAndDrugIdAndMaxSort(@Param("proId")String proId, @Param("drugId")String drugId);
}